<?php
/**
 * Smart Library - Smart Framework
 * http://smart-framework.highet.eu
 *
 * @category   SmartL
 * @package    SmartL_Application
 * @subpackage Config
 * @copyright  Copyright (c) 2005-2008 Smart Framework team - Stepan Sindelar, Vojtech Vit
 * @license    http://www.opensource.org/licenses/bsd-license.php	New BSD License
 */

/**
 * Class that holds data of configuration for one cache adapter.
 * 
 * @package SmartL_Application
 * @subpackage Config
 */
class SmartL_Application_Config_CacheAdapterInfo {
	private $_name;
	private $_backend;
	private $_frontend;
	private $_backendOptions;
	private $_frontendOptions;
	private $_disabled;
	
	/**
	 * Constructs instance.
	 *
	 * @param string $name Name of adapter.
	 * @param string $backend Backend call id for Zend_Cache::factory
	 * @param string $frontend Frontend call id for Zend_Cache::factory
	 * @param array $backendOptions Options for backend.
	 * @param array $frontendOptions Options for frontend.
	 */
	public function __construct($name, $backend, $frontend = 'Core', $backendOptions, $frontendOptions = array(), $disabled) {
		$this->_name = $name;
		$this->_backend = $backend;
		$this->_frontend = $frontend;
		$this->_backendOptions = $backendOptions;
		$this->_frontendOptions = $frontendOptions;
		$this->_disabled = $disabled;
	}
	
	/**
	 * Returns name of this adapter.
	 *
	 * @return string
	 */
	public function getName() {
		return $this->_name;
	}
	
	/**
	 * Backend call id for Zend_Cache::factory
	 *
	 * @return string
	 */
	public function getBackendName() {
		return $this->_backend;
	}
	
	/**
	 * Frontend call id for Zend_Cache::factory
	 *
	 * @return string
	 */
	public function getFrontendName() {
		return $this->_frontend;
	}
	
	/**
	 * Options for backend.
	 *
	 * @return array
	 */
	public function getBackendOptions() {
		return $this->_backendOptions;
	}
	
	/**
	 * Options for frontend.
	 *
	 * @return array
	 */
	public function getFrontendOptions() {
		return $this->_frontendOptions;
	}
	
	/**
	 * Is this adapter disabled?
	 *
	 * @return boolean
	 */
	public function isDisabled() {
		return $this->_disabled;
	}
}